<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .container {
      width: 600px;
      height: auto;
      border: 1px solid #000;
    }

    .box{
      width: 0%;
      height: 30px;
      overflow: hidden;
      transition-property: all;
      transition-duration: 2s;
      line-height: 30px;
    }

     .container:hover .box{
      width: 100%;
    }


    .box1{
      background-color: red;
      transition-timing-function: ease;
    }

    .box2{
      background-color: chocolate;
      transition-timing-function: ease-in;
    }

    .box3{
      background-color: rebeccapurple;
      transition-timing-function: ease-out;
    }

    .box4{
      background-color: blanchedalmond;
      transition-timing-function: ease-in-out;
    }

    .box5{
      background-color: darkgoldenrod;
      transition-timing-function: linear;
    }

    .box6{
      background-color: darkkhaki;
      transition-timing-function:step-start;
    }

    .box7{
      background-color: darkolivegreen;
      transition-timing-function:step-end;
    }

    .box8{
      background-color: rgb(176, 126, 201);
      transition-timing-function: steps(20);
    }

    .box9{
      background-color: rgb(176, 201, 153);
      transition-timing-function: cubic-bezier(.39,.42,.32,1.04);
    }

  </style>
</head>
<body>
  <div class="container">
    <div class="box box1">ease(慢，快，慢)</div>
    <div class="box box2">ease-in（慢，快）</div>
    <div class="box box3">ease-out（快，慢）</div>
    <div class="box box4">ease-in-out（慢，快，慢）</div>
    <div class="box box5">linear（匀速）</div>
    <div class="box box6">step-start不考虑过渡时间，直接到终点</div>
    <div class="box box7">step-end考虑过渡时间，但是没有过渡效果，过渡时间到了以后就到终点</div>
    <div class="box box8">steps分步过渡</div>
    <!-- 贝尔塞曲线 https://cubic-bezier.com/ -->
    <div class="box box9">贝尔塞曲线</div>
  </div>
</body>
</html>